<?php
require_once('../includes/config.php');
if($_POST)
{
	$proid = $_POST['proid'];
	$name = $_POST['name'];
	$email = $_POST['email'];
	$comment_content = $_POST['content'];
	$lowercase = strtolower($email);
  $image = md5( $lowercase );
	$timenow = date("Y-m-d H:i:s");
	$sql = "INSERT INTO tbl_comment (id_product, name, email, comment_content, dateadded) VALUES ('$proid','$name','$email','$comment_content','$timenow')";
	mysql_query("$sql") or die("can not insert comment to database");
}
else { }
?>
<div class="box">
<img src="http://www.gravatar.com/avatar.php?gravatar_id=<?php echo $image; ?>" style="float:left; width:60px; height:60px; margin-right:20px"/><span style="font-size:16px; color:#663399; font-weight:bold"> <?php echo $name;?></span> <br /><br />

<?php echo $comment_content; ?>
</div>
